﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LuaInterface;
using WentStateMachine;

public class GameManager : LuaClient
{
    public StateMachineController Controller;

    private StateMachineLuaDriver driver;

    protected override LuaFileUtils InitLoader()
    {
        return new AddressableLuaScriptLoader();
    }

    protected override void OnLoadFinished()
    {
        base.OnLoadFinished();
        driver = new StateMachineLuaDriver();
        driver.Drive(Controller).Start();
    }

    private void Update()
    {
        driver?.OnUpdate();
    }
}
